package com.shuke.sk_worm.Mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shuke.sk_worm.domain.SkAccounts;
import com.shuke.sk_worm.domain.SkShopInfo;
import com.shuke.sk_worm.vo.ShopInfoListVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface SkShopInfoMapper extends BaseMapper<SkShopInfo> {

    List<ShopInfoListVo> findShopInfoList(@Param(value = "platform") Integer platform);

    List<ShopInfoListVo> listServiceShop(Integer platform, Integer deptId);

    List<ShopInfoListVo> listShopByIds(@Param(value = "platform") Integer platform, @Param(value = "shopIds") List<Long> shopIds);

    List<ShopInfoListVo> listShopByIsAbnormal(@Param(value = "platform") Integer platform, @Param(value = "isAbnormal") Integer isAbnormal);

    List<ShopInfoListVo> listShopByLoginFail(@Param(value = "platform") Integer platform);

    List<ShopInfoListVo> listShopByUpdateTime(@Param(value = "platform") Integer platform, @Param(value = "time") Date time);

    List<ShopInfoListVo> findShopInfoListByCookie(@Param(value = "platform") Integer platform, @Param(value = "cookieTime") Integer cookieTime);

    List<ShopInfoListVo> listNotTokenShop(@Param(value = "platform") Integer platform);

    Boolean updateAbnormal(@Param(value = "shopId") Long shopId);

    Boolean updateAbnormalTime(@Param(value = "shopId") Long shopId, @Param(value = "errorTime") Date errorTime);

    Boolean updateAbnormalByShopId(@Param(value = "shopId") Long shopId, @Param("msg") String msg);

    Boolean updateNotAbnormalByShopId(Long shopId);

    List<SkAccounts> findShopAccounts(Integer platform);
    
}
